package com.zb.sannuo.thereport.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.zb.sannuo.common.domain.search.HglReports;
import com.zb.sannuo.common.result.Result;
import com.zb.sannuo.common.result.ResultCode;
import com.zb.sannuo.thereport.service.HglReportsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/reports")
@Api(value = "报表管理模块",description = "合格率分析")
@CrossOrigin
public class HglReportsController {

    @Resource
    private HglReportsService hglReportsServiceImpl;

    @ApiOperation(value = "合格率分析",notes = "合格率分析",httpMethod = "GET")
    @RequestMapping(value = "findHgl",method = RequestMethod.GET)
    public Result findHgl(String searchParams){
        System.out.println("合格率:" + searchParams);
        List<HglReports> hgl = hglReportsServiceImpl.findHgl(searchParams);
        return Result.ok(ResultCode.SUCCESS,hgl);
    }
}
